{% extends "../base.html" %}

{% block title %}Create task{% endblock %}
{% block header %}Create task{% endblock %}

{% block content %}
		<a href="/projects">Projects</a>/
		<!-- <a href="/editProjectForm?projectId={{ projectId }}">Project</a>/ -->
		<a href="/tasks?projectId={{ projectId }}">Tasks</a>

		<form method="POST" action="/createTaskAction">
			<table>
				<tr>
					<td>
						<label for="no">No: </label>
					</td>
					<td>
						<input type="hidden" id="no" name="no" value="{{ no }}" ></input>
						{{ no }}		
					</td>
				</tr>
				<tr>
					<td>
						<label for="taskName">Task name: </label>
					</td>
					<td>
						<input maxlength="128" style="width: 400" id="taskName" name="taskName"></input>		
					</td>
				</tr>
				<tr>
					<td>
						<label for="description">Description: </label>
					</td>
					<td>
						<textarea id="description" name="description" rows="3" cols="60"></textarea>		
					</td>
				</tr>
				<tr>
					<td>
						<label for="priority">Priority: </label>
					</td>
					<td>
						<select name="priority" id="priority">
							<option value="0">Low</option>
							<option value="1" selected="selected">Medium</option>
							<option value="2">High</option>
						</select>
					</td>
				</tr>
				<tr>
					<td>
						<label for="assignedTo">Assign to: </label>
					</td>
					<td>
						<select name="assignedTo" id="assignedTo">
							{% for participant in participants %}
							<option>{{ participant.user.email }}</option>
							{% endfor %}
						</select>
					</td>
				</tr>
			</table>
			
			<input type="hidden" name="projectId" value="{{ projectId }}"></input>
			<input type="submit" value="Create"></input>
		</form>
{% endblock %}
